package com.jm.product.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.jm.product.controller.core.BaseController;
import com.jm.product.entity.SpecValues;

/**
 * 规格值Controller
 * @author sunshine
 * @version 2017-07-03
 */
@Controller
@RequestMapping(value = "product/specValues")
public class SpecValuesController extends BaseController<SpecValues,Integer> {

	protected String listPage() {

		return "product/specValuesList";
	}

	public String form(SpecValues specValues, Model model) {
		if (null != specValues && null != specValues.getId()){
			this.data = service.getById(specValues.getId());
			model.addAttribute("specValues", this.data);
		}
		return "product/specValuesForm";
	}

	public String savePage() {

		return "redirect:/product/specValues/?repage";
	}
	
}
